import { createBrowserRouter } from 'react-router-dom'
import App from '../App'
import Home from '../props/home/Index'
import Homelist from '../props/homelist/Index'
import Login from '../props/login/Index'
import Error from '../props/404/Index'
import Homelistnow from '../props/homelist/homelistnow/Index'
import Fz from '../props/fz/Index'
export const homerouters = [
    {
        path: '/home/homelist',
        element: <Homelist></Homelist>,
        title: '主页',
        children: [
            {
                path: '/home/homelist/homelistnow',
                element: <Homelistnow></Homelistnow>,
                title: '三级'
            }
        ]
    }
]
const routers = createBrowserRouter([
    {
        path: '/',
        element: <App></App>,
        children: [
            { index: true, element: <Home></Home> },
            {
                path: 'home',
                element: <Home></Home>,
                children: homerouters
            }
        ]
    },
    {
        path: '/login',
        element: <Login></Login>
    },
    {
        path: '*',
        element: <Error></Error>
    },
    {
        path: '/fz',
        element: <Fz></Fz>
    }
])
export default routers